DROP TABLE IF EXISTS jms_ods.yl_tms_branch_delivery_network;   
CREATE EXTERNAL TABLE jms_ods.yl_tms_branch_delivery_network(   
 ID bigint comment "主键",  --NUMBER(11)
 LINE_ID bigint comment "支线id",  --NUMBER(11)
 LINE_CODE string comment "支线编码",  --NVARCHAR2(30)
 LINE_NAME string comment "支线名称",  --NVARCHAR2(100)
 START_ID bigint comment "始发网点id",  --NUMBER(11)
 START_CODE string comment "始发网点编号",  --NVARCHAR2(20)
 START_NAME string comment "始发网点名称",  --NVARCHAR2(50)
 END_ID bigint comment "目的网点id",  --NUMBER(11)
 END_CODE string comment "目的网点编号",  --NVARCHAR2(20)
 END_NAME string comment "目的网点名称",  --NVARCHAR2(50)
 ROADSECTION_CODE string comment "路段编码",  --NVARCHAR2(20)
 DELIVERY_NETWORKLIST string comment "配载网点",  --NCLOB
 CREATE_BY bigint comment "创建人id",  --NUMBER(11)
 CREATE_BY_NAME string comment "创建人姓名",  --NVARCHAR2(20)
 CREATE_TIME timestamp comment "创建时间",  --DATE
 UPDATE_BY bigint comment "更新人id",  --NUMBER(11)
 UPDATE_BY_NAME string comment "更新人姓名",  --NVARCHAR2(20)
 UPDATE_TIME timestamp comment "更新时间",  --DATE
 DELIVERY_RESERVE_NETWORKLIST string comment "备用配载网点",  --NCLOB
 TRANS_CODE string comment "主用配载全选的父节点",  --NCLOB
 SHOW_CODE string comment "主用配载网点显示",  --NCLOB
 TRANS_RESERVE_CODE string comment "备用配载全选的父节点",  --NCLOB
 SHOW_RESERVE_CODE string comment "备用配载网点显示"  --NCLOB
 )     
 COMMENT '运单变化记录表'    
 PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)') 
 STORED AS PARQUET   
 LOCATION '/dw/hive/jms_ods.db/external/yl_tms_branch_delivery_network'    
 TBLPROPERTIES (    
 'discover.partitions'='false',   
 'parquet.column.index.access'='true'   
 );     
     
MSCK REPAIR TABLE jms_ods.yl_tms_branch_delivery_network;